#ifndef BROWSEFOLDERDIALOGEX_H_CAE4C12D_4E0E_4F83_9D32_1399AF34FD52
#define BROWSEFOLDERDIALOGEX_H_CAE4C12D_4E0E_4F83_9D32_1399AF34FD52
/**
 * \file BrowseFolderDialogEx.h
 *
 * \brief Header file for class CBrowseFolderDialogEx
 *
 * $Id: BrowseFolderDialogEx.h,v 1.4 2003/07/11 19:51:51 mgh Exp $
 *
 *
 * Copyright (C) 2003 Michael G. Herstine <sp1ff@pobox.com>
 *
 * Permission to use, copy, or  modify this source code is hereby
 * granted free  of charge,  provided that this  copyright notice
 * appear on all copies and  on all source code derived from this
 * code.  No representation is  made regarding the suitability of
 * this software for any purpose.  It is provided "as is" without
 * express or implied warranty.
 *
 *
 */


#ifndef STDAFX_H_A6207C03_3B23_4823_BC30_4088F15F3A93
//# error "You must include 'StdAfx.h' before this file for PCH!"
#endif  // not StdAfx.h

#ifndef BROWSEFOLDERDIALOG_H_97B5E754_8072_4B62_8278_410436D5A2D8
# include "BrowseFolderDialog.h"            // Parent class
#endif  // YABFFW.h


/**
 * \class CBrowseFolderDialogEx
 *
 * \brief CBrowseFolderDialog sub-class demonstrating customization
 *
 * \sa CBrowseFolderDialog
 *
 *
 * CBrowseFolderDialogEx specializes CBrowseFolderDialog to display a little "Recurse"
 * checkbox on the bottom of the dialog.  It's meant to be an
 * example of how much easier it is to customize the dialog with
 * this approach (since you're fully hooked into \c CWnd).  You
 * can display this dialog by selecting the "Show Recurse
 * Checkbox" checkbox on the demo app's main dialog before
 * hitting "Browse".
 *
 * Use it just like you would CBrowseFolderDialog.  On return, you can check
 * the value of the "Recurse" checkbox by calling GetRecurse() (I
 * \em hate public member variables).
 *
 *
 */

class CBrowseFolderDialogEx : public CBrowseFolderDialog
{
  // Construction
public:
  /// Construct a CBrowseFolderDialog dialog
  CBrowseFolderDialogEx(const CString &strHint = CString(),
              UINT nFlags = 0U, CWnd *pParentWnd = NULL,
              int nRootFolder = CSIDL_DESKTOP);
  /// Load the "hint" from Resource
  CBrowseFolderDialogEx(int nHint, UINT nFlags, CWnd *pParentWnd = NULL,
              int nRootFolder = CSIDL_DESKTOP);
  /// Construct a CBrowseFolderDialog dialog rooted at an arbitrary folder
  CBrowseFolderDialogEx(const CString &strHint, const CString &strRoot,
              UINT nFlags = 0U, CWnd *pParentWnd = NULL);
  /// Load the "hint" from Resource, but root the browse
  /// operation at an arbitrary folder
  CBrowseFolderDialogEx(int nHint, const CString &strRoot,
              UINT nFlags = 0U, CWnd *pParentWnd = NULL);

  // Attributes
public:
  /// Determine whether the user checked "Recurse"
  BOOL GetCheckStatus() const;

  // Operations
  // Overrides
public:
  /// Overridden to create the "Recurse" checkbox
  virtual void OnInitBFFDialog();

  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(CBrowseFolderDialogEx)
public:
  virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
                        AFX_CMDHANDLERINFO* pHandlerInfo);
protected:
  virtual void DoDataExchange(CDataExchange* pDX);
  //}}AFX_VIRTUAL

  // Implementation
public:
  virtual ~CBrowseFolderDialogEx();

  // Generated message map functions
protected:
  //{{AFX_MSG(CBrowseFolderDialogEx)
  afx_msg void OnDestroy();
  afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  afx_msg void OnSize(UINT nType, int cx, int cy);
  //}}AFX_MSG

  DECLARE_MESSAGE_MAP()

private:
  /// Checkbox we'll be adding
  CButton m_objCheckbox;
  /// Width of "Recurse" checkbox
  int m_nCheckboxWidth;
  int n_nCheckboxHeight;
  /// Recurse setting
  BOOL m_bDelete;


};


/////////////////////////////////////////////////////////////////


#ifndef _DEBUG
//inline BOOL CBrowseFolderDialogEx::GetCheckStatus() const
//{ return m_bDelete; }
#endif  // not _DEBUG


//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations
// immediately before the previous line.
//}}AFX_STOP_SYNTAX_HIGHLIGHTING


// Local Variables:
// fill-column: 65
// indent-tabs-mode: nil
// show-trailing-whitespace: t
// End:

#endif // RECURSEBFF_H_CAE4C12D_4E0E_4F83_9D32_1399AF34FD52
